package PloyArray;

public class Teacher extends Person {
    private double salary;

    public Teacher(String name, int age, double salary) {
        super(name, age);
        this.salary = salary;
    }

    public double getSalary() {
        return salary;
    }

    @Override
    public String say() {
        return super.say() + "\t" + "salary=" + salary;

    }
    public void teaching(){
        System.out.println("老师"+getName()+"正在上课");
    }
}
